using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class web_pages_ajax_list_chuyen_mon : System.Web.UI.Page
{
    public DataTable dtt;
    public DataTable dtt_node;
    public DataTable dtt_hang;
    public bool root = false;
    public string id_cha = "NULL";
    protected void Page_Load(object sender, EventArgs e)
    {
        Common comm = new Common();

        string tp_id = Request.QueryString["id"];
        string sqlComm = "";

        if (tp_id.Trim().Equals("NULL"))
        {
            root = true;
            sqlComm = "Select ma_chuyen_mon, ten_chuyen_mon,ma_chuyen_mon_cha,nut_la from DanhMuc_chuyen_mon where muc = 0 ";
        }
        else
        {
            id_cha = ViecLamTrong.getChuyenMonCha(tp_id);
            sqlComm = "Select ma_chuyen_mon, ten_chuyen_mon,ma_chuyen_mon_cha,nut_la from DanhMuc_chuyen_mon where  ma_chuyen_mon_cha = '" + tp_id + "' ";
        }
        dtt = comm.getDataTable(sqlComm);
       
         sqlComm = "select * from Danhmuc_hoc_van where kich_hoat = 1;";
        dtt_node = comm.getDataTable(sqlComm);
        sqlComm = "select * from Danhmuc_hang_tot_nghiep where kich_hoat = 1;";
        dtt_hang = comm.getDataTable(sqlComm);
        
    }
   
}
